/*
 * Copyright (C) 2010-2010 MaoJian Wu
 *
 * Author:
 *	MaoJian Wu
 *
 * Source:
 *	
 *
 * This file is a part of zfspear library.
 *
 *
 */

#include "starttls.h"
#include "xmpp_uri.h"

Starttls::Starttls():XmppElement("starttls",XmppUri::TLS),required_(true) {
}
bool Starttls::Required() {
     return this->HaveTag("required");
}
void Starttls::SetRequired(bool required) {
    if(required) {
        if(!HaveTag("required")) {
           SetTag("required");
        }
    } else {
        if(HaveTag("required")) {
           RemoveTag("required");
       }
    }
}
